import enum
from .errors import ErrorCodes as ErrorCodes
from .exceptions import InvalidSettingsValueError as InvalidSettingsValueError
from _typeshed import Incomplete
from collections.abc import Iterator, MutableMapping

class SettingCodes(enum.IntEnum):
    HEADER_TABLE_SIZE = ...
    ENABLE_PUSH = ...
    MAX_CONCURRENT_STREAMS = ...
    INITIAL_WINDOW_SIZE = ...
    MAX_FRAME_SIZE = ...
    MAX_HEADER_LIST_SIZE = ...
    ENABLE_CONNECT_PROTOCOL = ...

class ChangedSetting:
    setting: Incomplete
    original_value: Incomplete
    new_value: Incomplete
    def __init__(self, setting: SettingCodes | int, original_value: int | None, new_value: int) -> None: ...

class Settings(MutableMapping[SettingCodes | int, int]):
    def __init__(self, client: bool = True, initial_values: dict[SettingCodes, int] | None = None) -> None: ...
    def acknowledge(self) -> dict[SettingCodes | int, ChangedSetting]: ...
    @property
    def header_table_size(self) -> int: ...
    @header_table_size.setter
    def header_table_size(self, value: int) -> None: ...
    @property
    def enable_push(self) -> int: ...
    @enable_push.setter
    def enable_push(self, value: int) -> None: ...
    @property
    def initial_window_size(self) -> int: ...
    @initial_window_size.setter
    def initial_window_size(self, value: int) -> None: ...
    @property
    def max_frame_size(self) -> int: ...
    @max_frame_size.setter
    def max_frame_size(self, value: int) -> None: ...
    @property
    def max_concurrent_streams(self) -> int: ...
    @max_concurrent_streams.setter
    def max_concurrent_streams(self, value: int) -> None: ...
    @property
    def max_header_list_size(self) -> int | None: ...
    @max_header_list_size.setter
    def max_header_list_size(self, value: int) -> None: ...
    @property
    def enable_connect_protocol(self) -> int: ...
    @enable_connect_protocol.setter
    def enable_connect_protocol(self, value: int) -> None: ...
    def __getitem__(self, key: SettingCodes | int) -> int: ...
    def __setitem__(self, key: SettingCodes | int, value: int) -> None: ...
    def __delitem__(self, key: SettingCodes | int) -> None: ...
    def __iter__(self) -> Iterator[SettingCodes | int]: ...
    def __len__(self) -> int: ...
    def __eq__(self, other: object) -> bool: ...
    def __ne__(self, other: object) -> bool: ...
